package cz.proks.schoolpupilbook.gwt.widget.form.user;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

import cz.proks.schoolpupilbook.gwt.widget.common.LoggedUserPanel;
import cz.proks.schoolpupilbook.gwt.widget.common.UserForm;

public class UserWidget extends Composite {

	private static UserWidgetUiBinder uiBinder = GWT.create(UserWidgetUiBinder.class);

	interface UserWidgetUiBinder extends UiBinder<Widget, UserWidget> {
	}
	
	@UiField LoggedUserPanel loggedUserPanel;
	@UiField HTML text;
	@UiField UserForm userForm;
	

	public UserWidget() {
		initWidget(uiBinder.createAndBindUi(this));
		setText("You are editing user");
	}


	public LoggedUserPanel getLoggedUserPanel() {
		return loggedUserPanel;
	}


	public UserForm getUserForm() {
		return userForm;
	}
	
	public void setText(String text) {
		this.text.setHTML(text);
	}
}
